<template>
  <div>
    姓名：<input v-model="userName"/>{{ userName }}<br/>
    薪水：<input type="number" v-model="salary"/>{{ salary }}<br/>
    <button v-on:click="addSalary">提交</button>
  </div>

</template>
<script setup lang="ts">
// import { ref } from "vue"
//     let userName = ref("tom")
//     let salary = ref(1000)
//     function addSalary() {
//       salary.value += 1000
//     }

import Mysalary from './components/MySalary';
let {userName,salary,addSalary}=Mysalary()
  </script>

<style scoped>
.userInfo {
  background-color: aqua;
  width: 90%;
}
.userInfo span {
  background-color: yellow;
  margin-left: 10px;
  border: 1px;
  border-radius: 5px;
}
</style>
